import http from '../utils/http.js'
export default {
  token(data, func) {
    http.post(
      `/blade-auth/token?grantType=password&account=${data.account}`, {},
      (res) => {
        return typeof func == "function" && func(res)
      })
  },
  // 身份认证
  authentication(data, func) {
    http.get(
      `/commission/authentication`, data, func,
      (res) => {
        return typeof func == "function" && func(res)
      })
  },
  // 企业查询
  enterpriseList(data, func) {
    http.get(
      `/commission/enterpriseList`, data,
      (res) => {
        return typeof func == "function" && func(res)
      })
  },
  // 问答列表
  faqList(data, func) {
    http.get(
      `/commission/faqList`, data,
      (res) => {
        return typeof func == "function" && func(res)
      })
  },
  // 温馨提示
  remindList(data, func) {
    http.get(
      `/commission/remindList`, data,
      (res) => {
        return typeof func == "function" && func(res)
      })
  },
  // 客服列表
  serviceQrList(data, func) {
    http.get(
      `/commission/serviceQrList`, data,
      (res) => {
        return typeof func == "function" && func(res)
      })
  },
  // 产品集合
  commissionProduct(data, func) {
    http.get(
      `/commission/product`, data,
      (res) => {
        return typeof func == "function" && func(res)
      })
  },
  // 新增订单
  commissionSave(data, func) {
    http.post(
      `/commission/save`, data,
      (res) => {
        return typeof func == "function" && func(res)
      })
  },
  // 处理预支付订单请求
  payPrepay(data, func) {
    http.get(
      `/frontEnd/pay/prepay`, data,
      (res) => {
        return typeof func == "function" && func(res)
      })
  },
  // 处理订单查询请求的控制器方法
  payqueryOrder(data, func) {
    http.get(
      `/frontEnd/pay/queryOrder`, data,
      (res) => {
        return typeof func == "function" && func(res)
      })
  },
  // 订单列表
  commissionList(data, func) {
    http.get(
      `/commission/list`, data,
      (res) => {
        return typeof func == "function" && func(res)
      })
  },
}